home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Various / DevDisk 65 (1989)(DevWare PD).zip / DevDisk 65 (1989)(DevWare PD).adf / prosuite / main.c < prev    next >
C/C++ Source or Header  |  1990-07-11  |  2KB  |  55 lines

  1.  
  2. /* *** main.c ***************************************************************
  3.  *
  4.  * ColorWindow Routine  --  Main (Demonstration)
  5.  *     from Book 1 of the Amiga Programmers' Suite by RJ Mical
  6.  *
  7.  * Copyright (C) 1986, 1987, Robert J. Mical
  8.  * All Rights Reserved.
  9.  *
  10.  * Created for Amiga developers.
  11.  * Any or all of this code can be used in any program as long as this
  12.  * entire copyright notice is retained, ok?  Thanks.
  13.  *
  14.  * The Amiga Programmer's Suite Book 1 is copyrighted but freely distributable.
  15.  * All copyright notices and all file headers must be retained intact.
  16.  * The Amiga Programmer's Suite Book 1 may be compiled and assembled, and the 
  17.  * resultant object code may be included in any software product.  However, no 
  18.  * portion of the source listings or documentation of the Amiga Programmer's 
  19.  * Suite Book 1 may be distributed or sold for profit or in a for-profit 
  20.  * product without the written authorization of the author, RJ Mical.
  21.  * 
  22.  * HISTORY      NAME            DESCRIPTION
  23.  * -----------  --------------  --------------------------------------------
  24.  * 3 Jan 87     RJ >:-{)*       Clean-up for release      
  25.  * 27 Feb 86    =RJ Mical=      Modified these routines for Zaphod
  26.  * January 86   =RJ=            Modified the originals for Mandelbrot
  27.  * Late 85      =RJ=            Created the color window for Graphicraft
  28.  *
  29.  * *********************************************************************** */
  30.  
  31.  
  32.  
  33. #include "color.h"
  34.  
  35. UBYTE *OpenLibrary();
  36.  
  37.  
  38. struct GfxBase *GfxBase;
  39. struct IntuitionBase *IntuitionBase;
  40.  
  41.  
  42. VOID main()
  43. {
  44.     IntuitionBase = (struct IntuitionBase *)
  45.             OpenLibrary("intuition.library", 0);
  46.     GfxBase = (struct GfxBase *)OpenLibrary("graphics.library", 0);
  47.  
  48.     if (IntuitionBase && GfxBase)
  49.         DoColorWindow(NULL, 20, 20, 1, TRUE);
  50.  
  51.     if (IntuitionBase) CloseLibrary(IntuitionBase);
  52.     if (GfxBase) CloseLibrary(GfxBase);
  53. }
  54.  
  55.